<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->title;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />
<!--colorbox-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>


<!--bi-->
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/bi.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/bi.js"></script>
<script language="javascript">
	function selData(action,dateType,doType){
		$('#searchForm').attr('action', action);
		$('#dateType').attr('value', dateType);
		$('#doType').attr('value', doType);
		$('#searchForm').submit();
	}
	function selCode(nu,pa){
		for(var i=1;i<=nu;i++){
			$("table#installTable"+i).hide();
			$("td#td"+i).removeClass("no_bottom_boder");
			$("td#td"+i).addClass("yes_boder");
		}
		$("table#installTable"+pa).show();
		$("td#td"+pa).removeClass();
		$("td#td"+pa).addClass("no_bottom_boder");
	}
</script>

</head>
<body style="overflow:auto;">
<div id="main" style="clear:both;">
		<div class="bi-body">
			<form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl(array('action'=>'index'));?>" >
			<div class="bi-search  bi-search-2">
				<div class="bi-s-top"></div>
				<div class="bi-s-center">
					<div class="bi-s-c-con">
						<div class="bi-s-c-sel">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
							  	<td colspan="5">
									<!-- 时间选择条 -->
									<div id="timeRange">
										<a onclick="selData('<?php echo $this->projectUrl(array('action'=>'index')) ;?>',2,<?php echo $this->vars['doType'];?>);" class="<?php echo $this->vars['dateType']==2 ? 'currentTimeRange' : ''?>">最近7天</a>
										<a onclick="selData('<?php echo $this->projectUrl(array('action'=>'index')) ;?>',3,<?php echo $this->vars['doType'];?>);" class="<?php echo $this->vars['dateType']==3 ? 'currentTimeRange' : ''?>">最近30天</a>
										<a onclick="selData('<?php echo $this->projectUrl(array('action'=>'index')) ;?>',4,<?php echo $this->vars['doType'];?>);" class="<?php echo $this->vars['dateType']==4 ? 'currentTimeRange' : ''?>">最近三个月</a> 
										<a onclick="selData('<?php echo $this->projectUrl(array('action'=>'index')) ;?>',5,<?php echo $this->vars['doType'];?>);" class="<?php echo $this->vars['dateType']==5 ? 'currentTimeRange' : ''?>">全部</a>&nbsp;&nbsp;&nbsp;&nbsp;
										<span>日期选择</span>：<input name="startTime" type="text" class="input" id="startTime" size="18" value="<?php echo $this->vars['startTime'];?>" /><script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});</script>
						-
						<input name="endTime" type="text" class="input" id="endTime" size="18" value="<?php echo $this->vars['endTime'];?>" />
						<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});</script>
									</div>
									<!-- 时间选择条 -->								</td>
								<td rowspan="2">
									<input type="hidden" name="dateType" id="dateType" value="<?php echo $this->vars['dateType'];?>" />
									<input type="hidden" name="doType" id="doType" value="<?php echo $this->vars['doType'];?>" />	
									<input name="search" type="button" id="search" value="" class="s-button" onclick="selData('<?php echo $this->projectUrl(array('action'=>'index')) ;?>',6,<?php echo $this->vars['doType'];?>);"/>								</td>
							  </tr>
							  
							  <tr>
							    <td>&nbsp;</td>		
									<td >&nbsp;</td>
									<td >&nbsp;</td>
									<td >&nbsp;</td>
									<td>&nbsp;</td>
							  </tr>
								</table>
						</div>
									
						
						
					</div>	
				</div>
				<div class="bi-s-bottom"></div>			
			</div>
			</form>
			
			
			
			<div class="clear" style="height:20px;"></div>
			<div class="bi-data">
				<div class="bi-d-top">
					<div class="d-t-left">设备分析</div>
					
				</div>
				<div class="bi-d-center  clear" id="data01">
					<div class="bi-d-center-bg">
					<!--content start-->


					<span class="d-line"></span>
					<div id="content" >
						<table width="710" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:20px">
						  <tr>
						    <td height="25" colspan="6">&nbsp;</td>
					      </tr>
						  <tr>
							<td width="190" height="23" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(2,1)" id="td1" width="80" align="center" class="no_bottom_boder" style="cursor:pointer">新增用户</td>
							<td width="5" align="center" class="bottom_boder_one">&nbsp;</td>
							<td onclick="selCode(2,2)" id="td2" width="80" align="center" class="yes_boder" style="cursor:pointer">累积用户</td>
							<td width="5" align="center" class="bottom_boder_one">&nbsp;</td>
							<td align="center" class="bottom_boder_one">&nbsp;</td>
						  </tr>
				  	  </table>

						


						
					    <table width="710" class="table" id="installTable1">
                          <tr class="subject">
                            <td width="99">型号</td>
                            <td width="490">比例</td>
                            <td width="50">数量</td>
                            <td width="51">占比</td>
                          </tr>
						  <?php foreach ($this->couArr as $item) :?>
                          <tr>
                            <td><?php echo $item['deviceName'];?></td>
                            <td><div style="height:20px; background-color:#484848; width:<?php echo ceil(485*$item['width']);?>px"></div></td>
                            <td><?php echo $item['installNum'];?></td>
                            <td><?php echo $item['per'];?>%</td>
                          </tr>
						  <?php endforeach;?>
                        </table>
					   <table width="710" class="table" id="installTable2"  style="display:none">
                          <tr class="subject">
                            <td width="99">型号</td>
                            <td width="490">比例</td>
                            <td width="50">数量</td>
                            <td width="51">占比</td>
                          </tr>
						  <?php foreach ($this->allArr as $item) :?>
                          <tr>
                            <td><?php echo $item['deviceName'];?></td>
                            <td><div style="height:20px; background-color:#484848; width:<?php echo ceil(485*$item['width']);?>px"></div></td>
                            <td><?php echo $item['installNum'];?></td>
                            <td><?php echo $item['per'];?>%</td>
                          </tr>
						  <?php endforeach;?>
                      </table>
					</div>
					<span class="d-line"></span>
					
					<!--content end-->
					</div>
				</div>
				<div class="bi-d-bottom"></div>
			</div>
			
			
			<div class="clear" style="height:20px;"></div>
			<div class="bi-data">
				<div class="bi-d-top">
					<div class="d-t-left"><?php echo $this->vars['startTime'];?> 至 <?php echo $this->vars['endTime'];?> 设备分析详情</div>
					<div class="d-t-right"><span <?php if(count($this->rows)>0){?>class="show"<?php } else {?>class="hide"<?php }?> id="data_03" onclick="showData('03')" style="cursor:pointer;"></span></div>
				</div>
				<div class="bi-d-center  clear" id="data03">
					<div class="bi-d-center-bg">
					<!--content start-->
					<span class="d-line"></span>
					<table class="table">
						<tr class="subject">
							<td>型号</td>
							<td>数量</td>
							<td>比例</td>
						</tr>
						<?php
						foreach ($this->rows as $k => $v) :
						?>
						<tr>
							<td><?php echo $v['deviceName'];?></td>
							<td><?php echo $v['installNum'];?></td>
							<td><?php echo $v['per'];?>%</td>
						</tr>
						<?php endforeach;?>
						<td colspan="3" class="paginator"><div align="right"><?php echo $this->pageString;?></div></td>
				  	</table>
					<!--content end-->
					</div>
				</div>
				<div class="bi-d-bottom"></div>
			</div>
			
			
			
		</div>
	
</div>

</body>
</html>